{include file="./header" title="系统设置" /}
<div class="container-fluid">
<form action="" method="post" enctype="application/x-www-form-urlencoded">
 <!-- Nav tabs -->
  <ul class="nav nav-tabs" role="tablist">
    <li class="nav-item"><a href="#system" class="nav-link active" role="tab" data-toggle="tab">{:lang('基本设置')}</a></li>
    <li class="nav-item"><a href="#profile" class="nav-link" role="tab" data-toggle="tab">{:lang('站点设置')}</a></li>
    <li class="nav-item"><a href="#file" class="nav-link" role="tab" data-toggle="tab">{:lang('文件设置')}</a></li>
    <li class="nav-item"><a href="#messages" class="nav-link" role="tab" data-toggle="tab">{:lang('用户设置')}</a></li>
    <li class="nav-item"><a href="#settings" class="nav-link" role="tab" data-toggle="tab">{:lang('配置设置')}</a></li>
    
  </ul>

  <!-- Tab panes -->
  <div class="tab-content">
    <div role="tabpanel" class="tab-pane active" id="system">
        {foreach name="sql" item="val"}
        {if condition="$val.class eq 1"}
            <div class="form-group">
				<label for="{$val.name}">{$val.title}</label> 
				<span><literal>{</literal>$_G.system.{$val.name}<literal>}</literal></span>
                {switch name="val.type" }
                	{case value="textarea"}
                    	<textarea class="form-control" name="{$val.name}" id="{$val.name}">{$val.value}</textarea>
                    {/case}
                	{default /}
                    	<input name="{$val.name}" type="{$val.type}"  class="form-control" id="{$val.name}" placeholder="{$val.title}" value="{$val.value}">
                {/switch}
    			</div>
		{/if}
        {/foreach}
    </div>
    
    <div role="tabpanel" class="tab-pane" id="file">
    	{foreach name="sql" item="val"}
        {if condition="$val.class eq 4"}
            <div class="form-group">
				<label for="{$val.name}">{$val.title}</label> 
				<span><literal>{</literal>$_G.system.{$val.name}<literal>}</literal></span>
                {switch name="val.type" }
                	{case value="textarea"}
                    	<textarea class="form-control" name="{$val.name}" id="{$val.name}">{$val.value}</textarea>
                    {/case}
                	{default /}
                    	<input name="{$val.name}" type="{$val.type}"  class="form-control" id="{$val.name}" placeholder="{$val.title}" value="{$val.value}">
                {/switch}
    			</div>
		{/if}
        {/foreach}
    </div>
    
    <div role="tabpanel" class="tab-pane" id="profile">
    	{foreach name="sql" item="val"}
        {if condition="$val.class eq 2"}
            <div class="form-group">
				<label for="{$val.name}">{$val.title}</label> 
				<span><literal>{</literal>$_G.system.{$val.name}<literal>}</literal></span>
                {switch name="val.type" }
                	{case value="textarea"}
                    	<textarea class="form-control" name="{$val.name}" id="{$val.name}">{$val.value}</textarea>
                    {/case}
                	{default /}
                    	<input name="{$val.name}" type="{$val.type}"  class="form-control" id="{$val.name}" placeholder="{$val.title}" value="{$val.value}">
                {/switch}
    			</div>
		{/if}
        {/foreach}
    </div>
    
    <div role="tabpanel" class="tab-pane" id="messages">
    	{foreach name="sql" item="val"}
        {if condition="$val.class eq 3"}
            <div class="form-group">
				<label for="{$val.name}">{$val.title}</label> 
				<span><literal>{</literal>$_G.system.{$val.name}<literal>}</literal></span>
                {switch name="val.type" }
                	{case value="textarea"}
                    	<textarea class="form-control" name="{$val.name}" id="{$val.name}">{$val.value}</textarea>
                    {/case}
                	{default /}
                    	<input name="{$val.name}" type="{$val.type}"  class="form-control" id="{$val.name}" placeholder="{$val.title}" value="{$val.value}">
                {/switch}
    			</div>
		{/if}
        {/foreach}
    </div>
    
    <!--参数配置-->
    <div role="tabpanel" class="tab-pane" id="settings">
    	{foreach name="config" item="val"}
        <div class="form-group">
          <label for="config[{$key}]">{$key}</label> 
          <span><literal>{</literal>{$key}<literal>}</literal></span>
			<input name="config[{$key}]" type="text"  class="form-control"  value="{$val}">
            </div>
        {/foreach}
    </div>
  </div>

<div class="form-group">
	<input type="submit" class="btn btn-primary" id="button" value="提交" />
</div>


</form>
</div>
{include file="./footer" /}